package com.day20.Priority;

public class ThreadPriorityDemo {
    public static void main(String[] args) {
        ThreadPriority t1 = new ThreadPriority();
        ThreadPriority t2 = new ThreadPriority();
        ThreadPriority t3 = new ThreadPriority();
        t1.setName("高铁");
        t2.setName("飞机");
        t3.setName("汽车");
        System.out.println(t1.getPriority());
        System.out.println(t2.getPriority());
        System.out.println(t3.getPriority());
        t1.setPriority(Thread.MAX_PRIORITY);
        t3.setPriority(Thread.MIN_PRIORITY);
        t2.setPriority(Thread.NORM_PRIORITY);
        t1.setPriority(5);
        t2.setPriority(10);
        t3.setPriority(1);
        t1.start();
        t2.start();
        t3.start();
    }
}
